<style lang="scss">
  @import '../uv.scss';
</style>
<template>
  <div class="p1756452081 mt30  pt30" :class="'pickup_address-' + serviceStatus">
    <div class="fac pl30 pr30 jcsb">
      <div class="fac" style=" display: flex;flex-wrap: wrap;">
        <div class="p1756449733   fz26"
          :style="{color: typeForm[form.type]['color'], background: typeForm[form.type]['bgColor']}"
          style="display: inline-block;">{{typeForm[form.type].text}}</div>
         <slot name="time"></slot>

      </div>
      <div v-if="serviceStatus != 5" style="font-weight: 700;color: #E60012;">
        <div class="fz30" style="display: inline;">¥</div>
        <div class="fz40" style="display: inline;">{{form.order_price}}</div>
      </div>
    </div>
    <div @click="openDesc"  class="f pl30 pr30 pt30 pb30">
      <div class="fz30 p1756450135" style="display: inline;line-height: 1.3;">服务地址:</div>
      <div style="line-height: 1;">
        <div class="fz34 pr20" style="font-weight: 700;display: inline;">{{form.delivery_address_storey}}</div>
        <div v-if="form.delivery_address_house_number" class="fz34" style="font-weight: 700;display: inline;color: #333;">
          ({{form.delivery_address_house_number}})</div>
        <!-- <div v-if="form.delivery_address_address" class="fz30 pt20" style="color: #595757;line-height: 1.3;">{{form.delivery_address_address}}</div> -->
      </div>
    </div>
    <div v-if="form.goods_img && form.goods_img.length" class="f pb30 pl30 pr15">
      <div class="fz30 p1756450135" style="display: inline;">宠物照片:</div>
      <div class="p1756451296" style="flex: 1;">
        <img v-for="(child, childIndex) in form.goods_img" :key=" childIndex" class="p1756450619"
          @click="previewImageTap(form.goods_img, childIndex)" :src="child" alt="宠物照片">
      </div>
    </div>
    <div class="f " style="padding-left: 90rpx;">
      <div class="p1756451654">
        <div class="fz30" style="display: inline;font-weight: 700;color: #F37E00;">需求信息：</div>
        <div class="fz30" style="display: inline;color: #F39800;">{{form.describe}}</div>
      </div>
    </div>
    <slot></slot>

  </div>
</template>
<script>
  import dataJsonMixin from '../mixin/dataJson.js'
  export default {
    props: {
      serviceStatus: {
        type: Number,
        default: 0
      },
      deliveryType: {
        type: Number,
        default: 2
      },
      form: {
        type: Object,
        default: {}
      },
    },
    mixins: [dataJsonMixin],
    data() {
      return {
        list: [
          'https://linshitong.oss-cn-shenzhen.aliyuncs.com/dev/image/2025/0826/9e057202508261153493195.jpg',
          'https://linshitong.oss-cn-shenzhen.aliyuncs.com/dev/image/2025/0826/9e057202508261153493195.jpg',
          'https://linshitong.oss-cn-shenzhen.aliyuncs.com/dev/image/2025/0826/9e057202508261153493195.jpg',
        ]
      }
    },
    methods: {
          openDesc() {
        uni.navigateTo({
          url: '/pages-neighbor/orderDesc?id=' + this.form.id
        });
      },
            openDesc() {
        if (this.serviceStatus == 0) return
        uni.navigateTo({
          url: '/pages-neighbor/orderDesc?id=' + this.form.id
        });
      },
      previewImageTap(urls, current) {
        uni.previewImage({
          urls: urls,
          current: current,
          fail() {
            this.$uv.toast('预览图片失败')
          },
        });
      },
    },
  }
</script>
<style lang="scss" scoped>
  .p1756452081 {
    background-color: #fff;
    border-radius: 20rpx;
    box-shadow: 2rpx 2rpx 20rpx 2rpx #eeeeee;
    margin-top: 30rpx;
    overflow: hidden;
  }

  .p1756449733 {
    font-weight: 500;
    color: #3DA316;
    background-color: #E3FACB;
    width: 130rpx;
    height: 45rpx;
    min-height: 45rpx;
    border-radius: 10rpx;
    text-align: center;
    line-height: 45rpx;
    margin-right: 10rpx;

  }

  .p1756450135 {
    width: 130rpx;
    max-width: 130rpx;
    margin-right: 10rpx;
    line-height: 1;
    white-space: nowrap;

  }

  .p1756451654 {
    background: #F7F8F8;
    border-radius: 10rpx;
    padding: 20rpx 30rpx;
    width: 100%;
    box-sizing: border-box;
    margin-right: 30rpx;
    line-height: 1.3;

  }

  .pickup_address-0.p1756452081 {
      box-shadow: none !important;
  }

  .p1756450619 {
    width: calc(33.33% - 20rpx);
    height: 100%;
    max-height: 160rpx;
    min-height: 160rpx;
    margin-right: 20rpx;
  }

  .p1756451296 {
    min-height: 160rpx;
    width: 100%;

  }

  .pr15 {
    padding-right: 10rpx;
  }
</style>